package py.com.fms.converter;

import java.io.Serializable;

import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.convert.ConverterException;

import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Logger;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.log.Log;

import py.com.fms.fms.bean.CurrencyBean;
import py.com.fms.session.WithinHolder;


@SuppressWarnings("unused")
@Name("statusConverter")
public class StatusConverter implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -9190662464815673649L;
	@Logger
	private Log log;
	public Object getAsObject(FacesContext arg0, UIComponent arg1, String arg2) {
		// TODO Auto-generated method stub
		Object obj0 = (String) "S";
		Object obj1 = (String) "N";
		if(arg2.equals("Active")){
			return obj0;
		}
		if(arg2.equals("Inactive")){
			return obj1;
		}
		return null;
	}
	
	public String getAsString(FacesContext arg0, UIComponent arg1, String arg2) {
		// TODO Auto-generated method stub
		Object obj0 = (String) "S";
		Object obj1 = (String) "N";
		if(arg2.equals((obj0))){
			return "Active";
		}
		if(arg2.equals((obj1))){
			return "Inactive";
		}
		return null;
	}

}
